<?php

namespace app\api\validate;

use think\Validate;

class Video extends Validate
{
    protected $rule =   [
        'ids|视频id列表' => 'require|array',
        'id|视频id'=>'require|number',
        'uid|用户id'=>'require|number',
        'title|视频名称'=>'require|chsDash|max:30',
        'src|视频路径'=>'file|fileExt:mp4,avi,mov,wmv,mkv',
        'description|视频描述'=>'require|max:50',
    ];

    protected $scene = [        
        'add'=>['uid','title','src','description'],
        'del'=>['ids'],
        'upd'=>['id'],
    ];
}